#pragma once

#include <QWidget>
#include "ui_brepWidget.h"
#include "modelSoft.h"
#include "RWTools.h"

QT_BEGIN_NAMESPACE
namespace Ui { class brepWidgetClass; };
QT_END_NAMESPACE

class brepWidget : public QWidget
{
	Q_OBJECT

public:
	brepWidget(modelSoft* myModelSoft, QWidget* parent = nullptr);
	~brepWidget();
	

protected:
	void receiveShapePipeline(Handle(QIVtkSelectionPipeline) pipeline);
	virtual void closeEvent(QCloseEvent* event) override;
	void OnConfirm();
	void OnModify();
	void OnSelTarget();
	void OnSelTool();
	void OnCancelSelTarget();
	void OnCancelSelTool();
	void OnBoolOPChange(int index);
	void CreateConnections();

private:
	Ui::brepWidgetClass* ui;
	modelSoft* myModelSoft;
	Standard_Integer currSelectTag = 1;
	bool modifyStatus = false;
	bool confirmCreated = false;
	int brepOpMode;
	bool targetReceive = false;
	bool toolReceive = false;
	BrepFeature* brepFeature;
	Handle(QIVtkSelectionPipeline) m_selectedPipelineTarget;
	Handle(QIVtkSelectionPipeline) m_selectedPipelineTool;
	Handle(QIVtkSelectionPipeline) m_resultPipeline;

};